    using System;
    using System.Collections.Generic;
    using System.Text;

namespace Microsoft.ConnectionEngine.Registers.Core.ServiceProvider.Common
{
   
    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
   /// <summary>
   /// Service Provider Class
   /// </summary>
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProvider
    {
        private string serviceProviderID;
        private ServiceProviderType serviceProviderType;
        private string displayName;
        /// <summary>
        /// Display Name
        /// </summary>
        public string DisplayName
        {
            get { return displayName; }
            set { displayName = value; }
        }
        private string systemName;
        /// <summary>
        /// System Name
        /// </summary>
        public string SystemName
        {
            get { return systemName; }
            set { systemName = value; }
        } private string publicKey;
        /// <summary>
        /// Public Key
        /// </summary>
        public string PublicKey
        {
            get { return publicKey; }
            set { publicKey = value; }
        }

        private string webServiceURL;
        /// <summary>
        /// Web Service URL
        /// </summary>
        public string WebServiceURL
        {
            get { return webServiceURL; }
            set { webServiceURL = value; }
        }
        private string encryptionAlgorithm;
        /// <summary>
        /// Encryption Algo Name
        /// </summary>
        public string EncryptionAlgorithm
        {
            get { return encryptionAlgorithm; }
            set { encryptionAlgorithm = value; }
        }
        private Contact contact;
        /// <summary>
        /// Property for returning Contact
        /// </summary>
        public Contact Contact
        {
            get { return contact; }
            set { contact = value; }
        }
        /// <summary>
        /// Service Provider Type
        /// </summary>
        public ServiceProviderType ServiceProviderType
        {
            get { return serviceProviderType; }
            set { serviceProviderType = value; }
        }

        public string ServiceProviderID
        {
            get { return serviceProviderID; }
            set { serviceProviderID = value; }
        }
    }
    
    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    /// <summary>
    /// Class Contact
    /// </summary>
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class Contact
    {
        private string name;
        /// <summary>
        /// Name
        /// </summary>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        private string addressLine1;
/// <summary>
/// AddressLine1 Property
/// </summary>
        public string AddressLine1
        {
            get { return addressLine1; }
            set { addressLine1 = value; }
        }
        private string addressLine2;
        /// <summary>
        /// AddressLine 2 Property
        /// </summary>
        public string AddressLine2
        {
            get { return addressLine2; }
            set { addressLine2 = value; }
        }
        private string city;
        /// <summary>
        /// Property for City
        /// </summary>
        public string City
        {
            get { return city; }
            set { city = value; }
        }
        private string postalCode;
        /// <summary>
        /// Postal Code
        /// </summary>
        public string PostalCode
        {
            get { return postalCode; }
            set { postalCode = value; }
        }
        private string province;
        /// <summary>
        /// State or Province
        /// </summary>
        public string Province
        {
            get { return province; }
            set { province = value; }
        }
        private string country;
        /// <summary>
        /// Country
        /// </summary>
        public string Country
        {
            get { return country; }
            set { country = value; }
        }
        private string phone;
        /// <summary>
        /// Phone
        /// </summary>
        public string Phone
        {
            get { return phone; }
            set { phone = value; }
        }
        private string fax;
        /// <summary>
        /// Fax
        /// </summary>
        public string Fax
        {
            get { return fax; }
            set { fax = value; }
        }
        private string email;
        /// <summary>
        /// Property for Email
        /// </summary>
        public string Email
        {
            get { return email; }
            set { email = value; }
        }

        /// <summary>
        /// Default Constructor
        /// </summary>
        public Contact()
        {
        }
        /// <summary>
        /// Parameterized Constructor
        /// </summary>
        /// <param name="name"></param>
        /// <param name="address1"></param>
        /// <param name="address2"></param>
        /// <param name="city"></param>
        /// <param name="province"></param>
        /// <param name="postalcode"></param>
        /// <param name="country"></param>
        /// <param name="phone"></param>
        /// <param name="fax"></param>
        /// <param name="email"></param>
        public Contact(string name, string address1, string address2, string city,
                       string province, string postalcode, string country, string phone,
                       string fax, string email)
        {
            this.Name = name;
            this.AddressLine1 = address1;
            this.AddressLine2 = address2;
            this.City = city;
            this.Province = province;
            this.PostalCode = postalcode;
            this.Country = country;
            this.Phone = phone;
            this.Fax = fax;
            this.Email = email;

        }
    }

    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    /// <summary>
    /// Service Provider List Class
    /// </summary>
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderList
    {
        private System.Collections.Generic.List<Pool> poolList;
        /// <summary>
        /// Pool List
        /// </summary>
        public List<Pool> PoolList
        {
            get
            {
                if (poolList == null)
                    poolList = new List<Pool>();
                return poolList;
            }
            set { poolList = value; }
        }
    }

    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    /// <summary>
    /// Service Provider Match List
    /// </summary>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister", IsNullable = false, ElementName = "HCUMatchList")]
    [Obsolete("Should be removed when cleaning up HSD")]
    public class ServiceProviderMatchList
    {
        private List<ServiceProviderMatch> serviceProviderMatchList;
        /// <summary>
        /// Match List
        /// </summary>
        [System.Xml.Serialization.XmlElementAttribute("HCUMatch")]
        public List<ServiceProviderMatch> MatchList
        {
            get { return serviceProviderMatchList; }
            set { serviceProviderMatchList = value; }
        }
        /// <summary>
        /// Default Constructor
        /// </summary>
        public ServiceProviderMatchList()
        {
            serviceProviderMatchList = new List<ServiceProviderMatch>();
        }

        public ServiceProviderMatchList(List<ServiceProviderMatch> matchlist)
        {
            serviceProviderMatchList = matchlist;
        }
    }

    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderMatch
    {

        private ServiceProvider serviceProvider;

        [System.Xml.Serialization.XmlElementAttribute("ServiceProvider")]
        public ServiceProvider ServiceProvider
        {
            get { return serviceProvider; }
            set { serviceProvider = value; }
        }

        public ServiceProviderMatch()
        {
            serviceProvider = new ServiceProvider();
        }

        public ServiceProviderMatch(ServiceProvider provider)
        {
            serviceProvider = provider;
        }
    }
    /// <summary>
    /// Servic eProvider MAtch Request
    /// </summary>
    [System.SerializableAttribute()]
    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    [System.Xml.Serialization.XmlRootAttribute("HCUMatchRequest", Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister", IsNullable = false)]
    public class ServiceProviderMatchRequest
    {

        private string displayNameField;
        private int serviceProviderTypeField;

        //Work Item ID: 142
        //Modified By: SachinJo
        //Commented the private field poolIDField as it's declared and assigned value but it's never used.
        //private int poolIDField;
        /// <summary>
        /// Display NAme
        /// </summary>
        public string DisplayName
        {
            get { return this.displayNameField; }
            set { this.displayNameField = value; }
        }
        /// <summary>
        /// Service Provider Type
        /// </summary>
        public int ServiceProviderType
        {
            get { return this.serviceProviderTypeField; }
            set { this.serviceProviderTypeField = value; }
        }
        /// <summary>
        /// Defualt Constructor
        /// </summary>
        public ServiceProviderMatchRequest()
        {
            displayNameField = string.Empty;
        }
        /// <summary>
        /// Param Const
        /// </summary>
        /// <param name="displayName"></param>
        /// <param name="serviceProviderType"></param>
        /// <param name="poolID"></param>
        public ServiceProviderMatchRequest(string displayName, int serviceProviderType, int poolID)
        {
            displayNameField = displayName;
            serviceProviderTypeField = serviceProviderType;

            //Work Item ID: 142
            //Modified By: SachinJo
            //Commented the private field poolIDField as it's declared and assigned value but it's never used.
            //poolIDField = poolID;
        }
    }


    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviders
    {
        private List<ServiceProvider> serviceProviderList;

        [System.Xml.Serialization.XmlElementAttribute("ServiceProvider")]
        public List<ServiceProvider> Items
        {
            get { return serviceProviderList; }
            set { serviceProviderList = value; }
        }

        public ServiceProviders()
        {
            serviceProviderList = new List<ServiceProvider>();
        }

        public ServiceProviders(List<ServiceProvider> newServiceProviderList)
        {
            serviceProviderList = newServiceProviderList;
        }
    }

    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderPoolLink
    {
        private int poolID = int.MinValue;
        public int PoolID
        {
            get { return poolID; }
            set { poolID = value; }
        }

        private int serviceProviderID = int.MinValue;
        public int ServiceProviderID
        {
            get { return serviceProviderID; }
            set { serviceProviderID = value; }
        }

        public ServiceProviderPoolLink() { }

        public ServiceProviderPoolLink(int poolID, int serviceProviderID)
        {
            this.poolID = poolID;
            this.serviceProviderID = serviceProviderID;
        }

    }


    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderPoolLinks
    {
        private List<ServiceProviderPoolLink> ServiceProviderPoolLinkList;

        [System.Xml.Serialization.XmlElementAttribute("ServiceProviderPoolLink")]
        public List<ServiceProviderPoolLink> Items
        {
            get { return ServiceProviderPoolLinkList; }
            set { ServiceProviderPoolLinkList = value; }
        }

        public ServiceProviderPoolLinks()
        {
            ServiceProviderPoolLinkList = new List<ServiceProviderPoolLink>();
        }

        public ServiceProviderPoolLinks(List<ServiceProviderPoolLink> serviceProviderPoolLinkList)
        {
            ServiceProviderPoolLinkList = serviceProviderPoolLinkList;
        }
    }

    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderType
    {
        private int serviceProviderTypeID = int.MinValue;
        public int ServiceProviderTypeID
        {
            get { return serviceProviderTypeID; }
            set { serviceProviderTypeID = value; }
        }

        private string displayName = string.Empty;
        public string DisplayName
        {
            get { return displayName; }
            set { displayName = value; }
        }

        private string serviceProviderTypeCode = string.Empty;
        public string ServiceProviderTypeCode
        {
            get { return serviceProviderTypeCode; }
            set { serviceProviderTypeCode = value; }
        }

        public ServiceProviderType()
        {
        }

        public ServiceProviderType(int serviceprovidertypeid, string displayname, string serviceprovidertypecode)
        {
            this.serviceProviderTypeID = serviceprovidertypeid;
            this.displayName = displayname;
            this.serviceProviderTypeCode = serviceprovidertypecode;
        }
    }
    
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderTypes
    {
        private List<ServiceProviderType> serviceProviderTypeList = new List<ServiceProviderType>();
        [System.Xml.Serialization.XmlElementAttribute("ServiceProviderType")]
        public List<ServiceProviderType> Items
        {
            get { return serviceProviderTypeList; }
            set { serviceProviderTypeList = value; }
        }

        public ServiceProviderTypes()
        {
            serviceProviderTypeList = new List<ServiceProviderType>();
        }

        public ServiceProviderTypes(List<ServiceProviderType> newServiceProviderTypeList)
        {
            serviceProviderTypeList = newServiceProviderTypeList;
        }
    }

    //JH21122005[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderSearchRequest
    {

        private string displayNameField = string.Empty;
        private string serviceProviderTypeField = string.Empty;
        private string poolIDField = string.Empty;
        private bool inPool = true;

        public bool InPool
        {
            get { return inPool; }
            set { inPool = value; }
        }

        public string DisplayName
        {
            get { return this.displayNameField; }
            set { this.displayNameField = value; }
        }

        public string PoolID
        {
            get { return this.poolIDField; }
            set { this.poolIDField = value; }
        }

        public string ServiceProviderType
        {
            get { return this.serviceProviderTypeField; }
            set { this.serviceProviderTypeField = value; }
        }

        public ServiceProviderSearchRequest()
        {
            displayNameField = string.Empty;
        }

        public ServiceProviderSearchRequest(string displayName, string serviceProviderType, string poolID)
        {
            displayNameField = displayName;
            serviceProviderTypeField = serviceProviderType;
            poolIDField = poolID;           
        }
    }

    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://Microsoft.ConnectionEngine/Schemas/ServiceProviderRegister")]
    public class ServiceProviderTypeSearchRequest
    {
        private string displayNameField = string.Empty;
        private string serviceProviderTypeCodeField = string.Empty;
        private string poolIDField = string.Empty;
        private bool inPool = true;

        public bool InPool
        {
            get { return inPool; }
            set { inPool = value; }
        }

        public string DisplayName
        {
            get { return this.displayNameField; }
            set { this.displayNameField = value; }
        }        

        public string ServiceProviderTypeCode
        {
            get { return this.serviceProviderTypeCodeField; }
            set { this.serviceProviderTypeCodeField = value; }
        }

        public string PoolID
        {
            get { return this.poolIDField; }
            set { this.poolIDField = value; }
        }

        public ServiceProviderTypeSearchRequest()
        {
        }

        public ServiceProviderTypeSearchRequest(string displayName, string serviceProviderTypeCode, string poolId)
        {
            displayNameField = displayName;
            serviceProviderTypeCodeField = serviceProviderTypeCode;
            poolIDField = poolId;
        }
    }
}